<template>
    <div class="plancommit">
        <el-row class="bg_colorF5 broder_b p_rl10" style="height:0.25rem;line-height:0.25rem">
            <el-col :span="2"><span>当前位置:</span></el-col>
            <el-col :span="18">
                 <el-checkbox-group  v-model="checkoption">
                    <el-checkbox @change="checkedbox" v-for="(otab, oindex) in optiontab" :label="otab" :disabled=disablefy :key="oindex">{{otab.title}}</el-checkbox>
                </el-checkbox-group>
            </el-col>
            <el-col v-if='optiontab.length>1' :span="4" class="t_right">
                <span @click="positioncheck">
                    <img v-if="!position_select" src="../../assets/img/plan/images/true_03.png" class="climg">
                    <img v-if="position_select" src="../../assets/img/plan/images/select_true.png" class="climg">
                </span>
                <span @click="positionconcelcheck" class="m_left5">
                    <img v-if="!position_noselect" src="../../assets/img/plan/images/false_05.png" class="climg">
                    <img v-if="position_noselect" src="../../assets/img/plan/images/close_true.png" class="climg">
                </span>

            </el-col>       
        </el-row>
        
        <el-row>
            <el-col :span="12">
                <el-row class="checknum">
                    <el-col :span='12' class="font_14" style="line-height: 0.36rem">我的号码：
                        <span class="color_ff8">{{commitinfo.betting_num}}</span>
                        注</el-col>
                    <el-col :span='12' class="t_right font_12" style="line-height: 0.35rem"><el-checkbox v-model="share_checked">将所有计划分享到平台</el-checkbox></el-col>
                </el-row>
                <!-- 号码选择,定位胆-->
                <el-row class="nomRowbox" v-if="leftinfoid ==46 || leftinfoid==98 || leftinfoid==108  || leftinfoid==102  || leftinfoid==112">
                    <div class="nomRow p_rl10 flex flex-align-center" :class="{'bg_colorF5': (index+1)%2}" v-for='(item,index) in digitArr' :key="index">
                        <span>{{item.digit}}:</span>
                        <div class="numIcon flex flex-align-center flex-pack-center" :class="{'numIcon-active':item.status == 1}" v-for='(item,e) in item.numTextArr' :key='e' @click="onChangeItem(index,e)"><p>{{item.num}}</p></div>
                         <img class="climg m_left10" src="@/assets/img/shrinkagetool/qx.png" alt="" @click="onQxFun(index)">
                        <img class="climg m_left10" src="@/assets/img/shrinkagetool/qxqx.png" alt="" @click="onQuXiaoFun(index)">
                    </div>
                </el-row>

                <!-- 号码输入 二星直选  -->
                <el-row v-if="leftinfoid!=46 && leftinfoid!=98 && leftinfoid!=108  && leftinfoid!=102  && leftinfoid!=112" class="nonRowinputbox nomRowbox">
                    <textarea class="textnum" v-model="numberitem" :placeholder="placeholder"  @keyup="changenumFn" style="font-size:0.12rem">
                            
                    </textarea>                       
                </el-row>


                <el-row class="p_rl10 line_height37 broder_b">
                    <el-col :span="12">
                        <span @click="copytext(2)" class="pointer"><img class="climg" src="../../assets/img/plan/images/copy_101.png" alt=""> 复制</span> 
                        <span @click="pastrFn" class="pointer" ><img class="climg m_left15" src="../../assets/img/plan/images/reset_107.png" alt=""> 粘贴</span> 
                        <span @click="clearFn" class="pointer"><img class="climg m_left15" src="../../assets/img/plan/images/false_05.png" alt=""> 清空</span> 
                    </el-col>
                    <el-col :span="12" class="t_right ">
                        <span>计划周期 
                            <input type="number" style="font-size:0.12rem;" class="cyclestyle" maxlength="2"  v-model="commitinfo.cycle">
                            <select name="" class="positionselect" v-model="commitinfo.cycle">
                                <option v-for="(cycleop, index) in cycleoption" :key="index" :value="cycleop.value">{{cycleop.lable}}</option>
                            </select>    
                        </span>
                        <span @click="commitPlan" class="m_left15"><img class="climg" src="../../assets/img/plan/images/copy_101.png" alt=""> 提交计划</span> 
                    </el-col>
                </el-row>
                <!-- <el-row class="p_rl10">
                    <el-col :span="12" class="m_top10">
                        <div>单注成本
                            <select class="inputwh m_left5">
                                <option value="2">2元</option>
                            </select>
                        </div>
                        <div class="m_top10">
                            <el-checkbox v-model="retecheck">累计收益率不低于<input v-model="rate" type="number" style="width:0.44rem;height: 0.25rem;border:1px solid #dddddd;margin:0 5px;font-size:0.12rem;" />%</el-checkbox>
                        </div>

                    </el-col>
                    <el-col :span="12" class="m_top10">
                        <div>倍数<input v-model="commitinfo.multiply" class="inputwh m_left5" type="number" maxlength="5"/></div>      
                        <div class="m_top10">奖金模式
                            <input class="bonusinput m_left5" style="font-size:0.12rem;" type="number" v-model="commitinfo.bonus" maxlength="4"/>
                            <select name="" class="bonusselect" v-model="commitinfo.bonus">
                                <option v-for="(cycleop, index) in bonusoption" :key="index" :value="cycleop.value">{{cycleop.lable}}</option>
                            </select>
                        </div>      
                    </el-col>
                </el-row> -->
                <!-- <el-row class="t_right m_top10 p_rl10">
                    <span @click="doubleFn" class="beitou"><img class="climg" src="../../assets/img/plan/images/false_05.png" alt="">倍投计算</span>                     
                </el-row>
                <el-row class="nomRowbox m_top10">
                    <div class="tablebox tablestyle">
                            <table id="tableId">
                                <thead>
                                    <th>期数</th>
                                    <th>倍数</th>
                                    <th>本期投入<br>(元)</th>
                                    <th>累计投入<br>(元)</th>
                                    <th>收益<br>(元)</th>
                                    <th>利润<br>(元)</th>
                                    <th>利润率<br>(%)</th>
                                </thead>
                                <tbody v-if="tableData1!=null">
                                    <tr v-for="(item,index) in tableData1" :key="index">
                                        <td>{{item.periods}}</td>
                                        <td>{{item.multiply}}</td>
                                        <td>{{item.cost}}</td>
                                        <td>{{item.total_cost}}</td>
                                        <td>{{item.bonus}}</td>
                                        <td>{{item.profit}}</td>
                                        <td>{{item.rate}}</td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                </el-row> -->
            </el-col>
            <!-- 文本、计划详情 -->
            <el-col :span="12" class="border_l">
                <div class="textPlan" style="border-top:none">
                    <span :class="{spanactive:textplanshow}" @click="textFn(1)">文本计划</span>
                    <div class="bottomLine" :class="{showtextline:planinfoshow}"></div>
                    <!-- <span :class="{spanactive:planinfoshow}" @click="textFn(2)">计划详情</span> -->
                    <!-- <div class="bottomLine rightLine" :class="{showtextline:textplanshow}"></div> -->
                    <span>当前模板</span>
                    <span @click="checktemplate">
                        <select class="broder_1d" v-model="commitinfo.template_id" style="font-size:0.12rem;">
                            <option v-for="(titem, index) in  teplatelist" :value="titem.id" :label="titem.title" :key="index">{{titem.title}}</option>
                        </select>
                    </span>
                    <span class="freshDate">刷新时间:<i>{{refreshtime}}</i></span>
                </div>
                <div class="planbox">
                    <!-- 文本计划详情 -->
                    <div class="Information" id="resettext" v-if="textplanshow">
                        <!--文本计划-->
                        <div class="t_center" v-if="planText == null">暂无数据</div>
                        <div v-if="planText != null">
                            <div v-if="planText.list"  v-for="(item,index) in planText.list" :key="index" id="text">  
                                <p>
                                    <span>{{item.issue}}</span>
                                    <span>【{{item.plan}}】</span>
                                    <span>{{item.position}}</span>
                                    <span>{{item.cycle}}<i>期</i></span>
                                    <span>{{item.betting_num}}<i>注</i></span>
                                    <span v-if="item.win_num==0 && item.issue_num == item.cycle">挂<i>({{item.cycle}})</i> </span>
                                    <span v-else-if="item.win_num>0 && item.issue_num == item.cycle">中<i>({{item.win_num}})</i> </span>
                                    <span v-if="item.issue_num != item.cycle "><i>进行中({{item.cycle - item.issue_num}})</i></span>
                                    <span>盈亏：{{item.surplus_deficit}}</span>
                                </p>
                                <div><span v-for='(ice, index11) in item.content' :key='index11'>【{{ice}}】</span>（总{{item.cycle}}期/第{{item.issue_num == 0 ? 1 : item.issue_num}}期） 倍投方案：{{item.multiply}}, 当前倍数：{{item.multiply}} 倍</div>
                                <div class="lineFen"></div>
                            </div>
                            <div v-if="planText.list">
                                <p>共 {{planText.count}} 个计划，中{{planText.count_win}}个 成功率 {{planText.win_rate}}</p>
                                <p>最新开奖号: {{planText.new_open_code}}</p>
                                <p>
                                    <span>彩盟人工计划</span>
                                </p>
                                <p>
                                    <span>彩盟计划，精准的人工计划联盟！</span>
                                </p>
                                <p>
                                    <span>善意提醒：小心参考，理性投资</span>
                                </p>
                                <p>
                                    <span>下载地址：<i>http://www.caimengjh.com/#/downloadCenter</i> </span>
                                </p>
                            </div>
                        </div>
                        
                    </div>
                    <!--计划详情-->
                    <div class="planxq" v-if="planinfoshow" >
                        <div class="tablebox">
                            <table id="tableId">
                                <thead>
                                    <th>期号（期）</th>
                                    <th>玩法</th>
                                    <th>周期</th>
                                    <th>注数</th>
                                    <th>倍投</th>
                                    <th>盈亏</th>
                                    <th>状态</th>
                                </thead>
                                <tbody v-if="planTextinfo!=null">
                                    <tr v-for="(item,index) in planTextinfo.list" :key="index">
                                        <td>{{item.issue}}</td>
                                        <td>{{item.plan}}</td>
                                        <td>{{item.cycle}}</td>
                                        <td>{{item.betting_num}}</td>
                                        <td>{{item.multiply}}</td>
                                        <td>{{item.surplus_deficit}}</td>
                                        <td v-if="item.win_status==0" class="waitsize">待开奖</td>
                                        <td v-else-if="item.win_status==1" class="getsize">中奖</td>
                                        <td v-if="item.win_status==2" class="losesize">未中奖</td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                    <div class="tablebottom" :class="{showtextinfor:opaplanxq}">
                        <span>实际收益：<i>0.53251%</i> </span>
                        <span>实际盈利：<i>100.00元</i></span>
                    </div>
                </div>

                <div class="leftBottom rightBottom">
                    <div class="rightPlanbox" @click="resetplan">
                        <img src="../../assets/img/plan/images/reset_107.png" alt="" class="imgone">
                        <span>重置计划</span>
                    </div>
                    <div class="rightPlanbox" @click="copytext(1)">
                        <img src="../../assets/img/plan/images/copy_101.png" alt="" class="imgtwo">
                        <span>复制</span>
                    </div>
                    <div class="rightPlanbox" @click="fresh">
                        <img src="../../assets/img/plan/images/refresh_98.png" alt="" class="imgthree">
                        <span>刷新</span>
                    </div>
                    <div class="rightPlanbox rightPlanboxo">
                        <img src="../../assets/img/plan/weixin.png" alt="" class="imgfive">
                        <span @click="sendmsgFn" id="open" >群发QQ/微信</span>
                    </div>
                </div>
                
            </el-col>
      </el-row>
      <div class="layerbox" v-if='isdel'>
                    <div class="del_win_box">
                        <div class="del_win_box_head flex flex-align-center p_lr20">
                            <div class="flex-1">删除模板</div>
                            <div class="t_right"><img class="pointer" src="@/assets/img/plan/layerclose.png" alt="" @click="colseFn"></div>                
                        </div>
                        <div class="del_win_box_content p_lr20">是否要重置计划</div>
                        <div class="del_click p_lr20">
                            <span class="broder_1d del_win_box_btn t_center inlineblock pointer" @click="delresetFn">确认</span>
                            <span class="broder_1d del_win_box_btn t_center inlineblock pointer " @click="colseFn">取消</span>
                        </div>
                    </div>
                </div>
    </div>
</template>

<script>
import Date from '@/assets/js/planjson';
if (window.require) {
    var ipc = window.require('electron').ipcRenderer
    var clipboard = window.require('electron').clipboard
  }
    export default {
        name: "plan",
        data() {
            return {
                optiontab: [],  //当前定位tab               
                checkoption: [],  //判断选中的定位
                disablefy: false,
                checkAll: false, //判断是否为全选
                isIndeterminate: false, // 全选CheckBox样式的变化
                placeholder: this.$store.state.leftMenu.name == '大小' ? '在这里输入大小的汉字  例：大 小': '',  //几星直选的placeholder提示语
                numberitem: '',  //输入的注数
                checknumWarr: [],  //定位胆万位，第一位选择
                checknumQarr: [],  //定位胆千位，第二位选择
                checknumBarr: [],  //定位胆百位，第三位选择
                checknumSarr: [],  //定位胆十位，第四位选择
                checknumGarr: [],  //定位胆个位，第五位选择
                checknumSixarr: [],  //定位胆第六位选择
                checknumSevenarr: [],  //定位胆第七位选择
                checknumEightarr: [],  //定位胆第八位选择
                checknumNinearr: [],  //定位胆第九位选择
                checknumTenarr: [],  //定位胆第十位选择
                checknumElevenarr: [],  //定位胆第十一位选择
                checknumTwelvearr: [],  //定位胆第十二位选择
                commitinfo:{  //提交计划接口参数
                    uid: this.$store.state.userInfo.id,
                    lottery_id: this.$store.state.lottery_id,
                    issue: '10',  //期号
                    plan: '',  //玩法
                    plan_identification: this.$store.state.leftMenu.planclass, //玩法标志
                    label_pc_id: this.$store.state.leftMenu.id,  //关联的玩法标签
                    position: '',  //提交参数：位置
                    position_identification: '',  //提交参数：位置标识
                    number_content:'', //提交参数：注投内容
                    betting_num: 0,  //注数
                    multiply: '1',  //倍投
                    cost: '2',  //单注成本
                    bonus: '1800',  //奖金模式
                    cycle: '2',  //周期
                    is_share: '', //是否分享到平台
                    template_id: '1',  //模板id                   
                },
                share_checked: true, //判断是否分享到平台
                retecheck: false,  //判断是否输入累计收益
                rate: '10', //累计收益率
                tableData1: [], //倍投结果
                teplatelist: [],  //模板列表
                digitArr: Date.GallDate.digitArr,  //定位胆号码选择arr 
                checkAll:'',  //判断当前位置的全选
                isIndeterminate: '', //判断当前位置的select全选样式变化
                opaplanxq:true,  //计划详情实际收益的显示
                textplanshow: true, //文本计划
                planinfoshow: false,  //计划详情
                planText:'',  //得到文本计划
                planTextinfo:'',  //得到计划详情
                refreshtime: '00:00',  //刷新时间
                position_noselect: false,
                position_select: false ,
                 cycleoption: [  //计划周期下拉框
                    {value: '10', lable: '10'},
                    {value: '20', lable: '20'},
                    {value: '30', lable: '30'},
                    {value: '40', lable: '40'},
                    {value: '50', lable: '50'},                    
                ],
                bonusoption: [ //奖金模式下拉框
                    {value: '1800', lable: '1800'},
                    {value: '1850', lable: '1850'},
                    {value: '1900', lable: '1900'},
                    {value: '1950', lable: '1950'},
                    {value: '2000', lable: '2000'},
                ],
                isdel: false //重置计划模态框
            }
        },
        computed:{
          leftinfoid(){
              return this.$store.state.leftMenu.id
         
          },
          lotteryid(){
              return this.$store.state.lottery_id
         
          },
          leftinfo(){
              return this.$store.state.leftMenu
          }

       },
       watch: {
           lotteryid(){
               this.changeleftidFn()
           },
           leftinfoid(){  //得到左侧菜单栏id
                this.changeleftidFn();
           },
           checkoption(){
               if(this.checkoption.length == this.optiontab.length){
                    this.position_noselect = false
                    this.position_select = true
               }
               if(!this.checkoption){
                    this.position_noselect = false
                    this.position_select = false
               }
                if(this.checkoption.length >0){
                    this.position_noselect = false
               }
               
           },
           numberitem(){  //监听输入的注数的变化
              var brnum_arr = []
                if(this.leftinfoid != 46){
                   brnum_arr = this.numberitem.split(' ')
                   if(brnum_arr == ""){
                        this.commitinfo.betting_num = 0
                   } else {
                        this.commitinfo.betting_num = brnum_arr.length
                   }
                }
           }
       },

       

       mounted(){
             this.option(this.leftinfoid)
             this.getTemplatelist();
             this.BulkHair();

            //  初始化样式;
             this.digitArr.forEach((e) => {
                 e.numTextArr.forEach((ele) => {
                     ele.status = 0;
                 })
             });
            
            // 获取已提交的模板;
            if(this.leftinfoid){
                this.getplanText(this.leftinfoid)
                this.getTextinfo(this.leftinfoid)
                this.getTemplatelist()
            }
       },
       created(){
             this.commitinfo.plan = this.leftinfo.name

             if(this.leftinfoid == 46){  //id=46的定位胆数据（腾讯..云南..新疆..天津..）
                    this.digitArr = Date.GallDate.digitArr                   
                }

                if(this.leftinfoid == 98){  //id=98的定位胆数据 (广东11选5)
                    this.digitArr = Date.GallDate.GD115arr                  
                }

                if(this.leftinfoid == 102){  //id=102的定位胆数据  （北京PK10）                   
                    this.digitArr = Date.GallDate.PK10arr                   
                }

                if(this.leftinfoid == 108){  //id=108的定位胆数据  （江苏快3）
                    this.digitArr = Date.GallDate.JsK3arr                   
                }

                if(this.leftinfoid == 112){  //id=112的定位胆数据  （重庆时时彩..福彩3D）
                    this.digitArr = Date.GallDate.FC3Darr                   
                }
       },

        methods:{
            changeleftidFn(){  //切换彩种，左侧菜单刷新
                this.option(this.leftinfoid)
                this.getTextinfo(this.leftinfoid)
                this.getplanText(this.leftinfoid)
                this.commitinfo.lottery_id = this.$store.state.lottery_id
                this.checkoption = []
                this.commitinfo.position = ''
                this.commitinfo.position_identification = ''
                this.commitinfo.plan = this.leftinfo.name
                this.commitinfo.plan_identification = this.$store.state.leftMenu.planclass
                this.commitinfo.label_pc_id = this.$store.state.leftMenu.id

                this.commitinfo.betting_num = 0
                this.checknumWarr = []
                this.checknumQarr = []
                this.checknumBarr = [] 
                this.checknumSarr = []
                this.checknumGarr = []
                this.checknumSixarr = []
                this.checknumSevenarr = []
                this.checknumEightarr = []
                this.checknumNinearr = []
                this.checknumTenarr = []
                this.checknumElevenarr = []
                this.checknumTwelvearr = []

                if(this.leftinfoid == 46){  //id=46的定位胆数据（腾讯..云南..新疆..天津..）
                    this.digitArr = Date.GallDate.digitArr
                    
                }

                if(this.leftinfoid == 98){  //id=98的定位胆数据 (广东11选5)
                    this.digitArr = Date.GallDate.GD115arr
                   this.commitinfo.betting_num = 0
                   
                }

                if(this.leftinfoid == 102){  //id=102的定位胆数据  （北京PK10）
                    
                    this.digitArr = Date.GallDate.PK10arr
                    
                }

                if(this.leftinfoid == 108){  //id=108的定位胆数据  （江苏快3）
                    this.digitArr = Date.GallDate.JsK3arr
                }

                if(this.leftinfoid == 112){  //id=112的定位胆数据  （重庆时时彩..福彩3D）
                    this.digitArr = Date.GallDate.FC3Darr
                    
                }
                
                this.digitArr.forEach(element => {  
                    element.numTextArr.forEach(item => {
                        item.status = 0;
                    })
                })
                
                this.commitinfo.betting_num = 0

                
               if(this.$store.state.leftMenu.name == '二星直选'){
                   if(this.$store.state.CaiPiaoType == 'pk10' || this.$store.state.CaiPiaoType == 'l11x5'){
                        this.placeholder = '在这里输入数字号码  例：0102 0304'
                   } else {
                        this.placeholder = '在这里输入数字号码  例：34 14'
                   }
                   
                   this.betting_num = 0
                   this.numberitem = ''
               } else if(this.$store.state.leftMenu.name == '三星直选'){
                   if(this.$store.state.CaiPiaoType == 'pk10' || this.$store.state.CaiPiaoType == 'l11x5'){
                        this.placeholder = '在这里输入数字号码  例：010203 020304'
                   } else {
                        this.placeholder = '在这里输入数字号码  例：134 234'
                   }
                    this.betting_num = 0
                    this.numberitem = ''
               } else if(this.$store.state.leftMenu.name == '四星直选'){
                   if(this.$store.state.CaiPiaoType == 'pk10' || this.$store.state.CaiPiaoType == 'l11x5'){
                        this.placeholder = '在这里输入数字号码  例：01020304 03040102'
                   } else {
                        this.placeholder = '在这里输入数字号码  例：1234 2345'
                   }
                    this.betting_num = 0
                    this.numberitem = ''
               } else if(this.$store.state.leftMenu.name == '五星直选'){
                  if(this.$store.state.CaiPiaoType == 'pk10' || this.$store.state.CaiPiaoType == 'l11x5'){
                        this.placeholder = '在这里输入数字号码  例：0102030405 0607080910'
                   } else {
                        this.placeholder = '在这里输入数字号码  例：12345 54123'
                   }
                    this.betting_num = 0
                   this.numberitem = ''
               } else if(this.$store.state.leftMenu.name == '龙虎'){
                   this.placeholder = '在这里输入龙虎的汉字  例：龙 虎'
                    this.betting_num = 0
                   this.numberitem = ''
               } else if(this.$store.state.leftMenu.name == '单双'){
                   this.placeholder = '在这里输入单双的汉字  例：单 双'
                    this.betting_num = 0
                   this.numberitem = ''
               } else if(this.$store.state.leftMenu.name == '大小'){
                   this.placeholder = '在这里输入大小的汉字  例：大 小'
                    this.betting_num = 0
                   this.numberitem = ''
               } else if(this.$store.state.leftMenu.name == '二位直选'){
                   this.placeholder = '在这里输入数字号码  例：0101 1111'
                    this.betting_num = 0
                   this.numberitem = ''
               } else if(this.$store.state.leftMenu.name == '三位直选'){
                   this.placeholder = '在这里输入数字号码  例：010101 111111'
                    this.betting_num = 0
                   this.numberitem = ''
               }
            },
            option(id){  //当前位置匹配
                var optab = []
                var tabB = []
                let lottery_type = this.$store.state.CaiPiaoType;

                this.https('manual/getObtainList', {lottery_type_identification:lottery_type}).then(data => {
                    optab = data
                    optab.forEach(tabclassA => {
                        tabclassA.child.forEach(tabclassB => {
                            if(id == tabclassB.id){
                                this.optiontab = tabclassB.label
                            }
                        })
                    });
                    if(this.optiontab.length == 1){
                         this.disablefy = true
                        this.checkoption = this.optiontab
                        this.arrtostringFn(this.checkoption)
                    } else {
                        this.disablefy = false
                    }
                })
            },

            positioncheck(){ //当前位置全选操作
               this.checkoption = this.optiontab
               this.position_noselect = false
               this.position_select = true
                this.arrtostringFn(this.checkoption)  
            },

            positionconcelcheck(){ //当前位置全选操作
            this.position_noselect = true
               this.position_select = false
               this.checkoption = []
                this.arrtostringFn(this.checkoption)  
            },

            checkedbox(value){  //当前位置选中操作
                let checkedCount = value.length;
                this.checkAll = checkedCount === this.checkoption.length;
                this.isIndeterminate = checkedCount > 0 && checkedCount < this.checkoption.length;
                this.arrtostringFn(this.checkoption)
                
            },

            arrtostringFn(arr){  //提取当前位置选中的位置（position）和位置标识（position_identification）参数
                var o_strarr = []
                var inde_starr = []
                arr.forEach(opt =>{
                    o_strarr.push(opt.title)
                    inde_starr.push(opt.identification)
                })
                this.commitinfo.position = o_strarr.join(',')
                this.commitinfo.position_identification = inde_starr.join(',')
            },

            onQxFun(index){ //定位胆全选
                for(var i in this.digitArr[index].numTextArr){
                    if(index == 0){                        
                        if(this.checknumWarr.length < this.digitArr[index].numTextArr.length){
                            this.checknumWarr.push(this.digitArr[index].numTextArr[i].num)
                        }
                    } else if(index == 1){
                        if(this.checknumQarr.length < this.digitArr[index].numTextArr.length){
                            this.checknumQarr.push(this.digitArr[index].numTextArr[i].num)
                        }    
                    } else if(index == 2){
                        if(this.checknumBarr.length < this.digitArr[index].numTextArr.length){
                            this.checknumBarr.push(this.digitArr[index].numTextArr[i].num)
                        }                        
                    } else if(index == 3){
                        if(this.checknumSarr.length < this.digitArr[index].numTextArr.length){
                            this.checknumSarr.push(this.digitArr[index].numTextArr[i].num)
                        }                        
                    } else if(index == 4){
                        if(this.checknumGarr.length < this.digitArr[index].numTextArr.length){
                            this.checknumGarr.push(this.digitArr[index].numTextArr[i].num)
                        }                       
                    }
                    else if(index == 5){
                        if(this.checknumSixarr.length < this.digitArr[index].numTextArr.length){
                            this.checknumSixarr.push(this.digitArr[index].numTextArr[i].num)
                        }                       
                    }
                    else if(index == 6){
                        if(this.checknumSevenarr.length < this.digitArr[index].numTextArr.length){
                            this.checknumSevenarr.push(this.digitArr[index].numTextArr[i].num)
                        }                       
                    }
                    else if(index == 7){
                        if(this.checknumEightarr.length < this.digitArr[index].numTextArr.length){
                            this.checknumEightarr.push(this.digitArr[index].numTextArr[i].num)
                        }                       
                    }
                    else if(index == 8){
                        if(this.checknumNinearr.length < this.digitArr[index].numTextArr.length){
                            this.checknumNinearr.push(this.digitArr[index].numTextArr[i].num)
                        }                       
                    }
                    else if(index == 9){
                        if(this.checknumTenarr.length < this.digitArr[index].numTextArr.length){
                            this.checknumTenarr.push(this.digitArr[index].numTextArr[i].num)
                        }                       
                    }
                    else if(index == 10){
                        if(this.checknumElevenarr.length < this.digitArr[index].numTextArr.length){
                            this.checknumElevenarr.push(this.digitArr[index].numTextArr[i].num)
                        }                       
                    }
                    else if(index == 11){
                        if(this.checknumTwelvearr.length < this.digitArr[index].numTextArr.length){
                            this.checknumTwelvearr.push(this.digitArr[index].numTextArr[i].num)
                        }                       
                    }
                    this.digitArr[index].numTextArr[i].status = 1;
                   
                } 
                //注数判断
                var self = this
                self.commitinfo.betting_num = self.checknumGarr.length+self.checknumSarr.length+self.checknumBarr.length+self.checknumQarr.length+self.checknumWarr.length + self.checknumSixarr.length + 
                                            self.checknumSevenarr.length + self.checknumEightarr.length + self.checknumNinearr.length +self.checknumTenarr.length + self.checknumElevenarr.length +
                                            self.checknumTwelvearr.length
            },

            onQuXiaoFun(index){ //定位胆取消全选
                for(var i in this.digitArr[index].numTextArr){
                    this.digitArr[index].numTextArr[i].status = 0;
                }
                if(index == 0){
                    this.checknumWarr = []
                } else if(index == 1){
                    this.checknumQarr = [] 
                } else if(index == 2){
                    this.checknumBarr = [] 
                } else if(index == 3){
                    this.checknumSarr = [] 
                } else if(index == 4){
                    this.checknumGarr = [] 
                } else if(index == 5){
                    this.checknumSixarr = [] 
                } else if(index == 6){
                    this.checknumSevenarr = [] 
                } else if(index == 7){
                    this.checknumEightarr = [] 
                } else if(index == 8){
                    this.checknumNinearr = [] 
                } else if(index == 9){
                    this.checknumTenarr = [] 
                } else if(index == 10){
                    this.checknumElevenarr = [] 
                } else if(index == 11){
                    this.checknumTwelvearr = [] 
                }
                //注数判断
                this.commitinfo.betting_num = this.checknumGarr.length+this.checknumSarr.length+this.checknumBarr.length+this.checknumQarr.length+this.checknumWarr.length + this.checknumSixarr.length + 
                                                this.checknumSevenarr.length + this.checknumEightarr.length + this.checknumNinearr.length +this.checknumTenarr.length + this.checknumElevenarr.length +
                                                this.checknumTwelvearr.length
            },

            onChangeItem(index,ele){ // 定位胆选码切换
                this.digitArr[index].numTextArr[ele].status == 0?this.digitArr[index].numTextArr[ele].status=1:this.digitArr[index].numTextArr[ele].status=0;
                if(index == 0){  //万位选码、第一位选码
                    if(this.digitArr[index].numTextArr[ele].status == 1){
                        this.checknumWarr.push(this.digitArr[index].numTextArr[ele].num)  
                    } else {
                       this.checknumWarr.splice(this.checknumWarr.indexOf(ele),1)    
                    } 
                }

                if(index == 1){  //千位选码、第二位选码
                    if(this.digitArr[index].numTextArr[ele].status == 1){
                        this.checknumQarr.push(this.digitArr[index].numTextArr[ele].num) 
                    } else {
                       this.checknumQarr.splice(this.checknumQarr.indexOf(ele),1)    
                    } 
                }   

                if(index == 2){  //百位选码、第三位选码
                    if(this.digitArr[index].numTextArr[ele].status == 1){
                        this.checknumBarr.push(this.digitArr[index].numTextArr[ele].num) 
                    } else {
                       this.checknumBarr.splice(this.checknumBarr.indexOf(ele),1)    
                    } 
                }

                if(index == 3){  //十位选码、第四位选码
                    if(this.digitArr[index].numTextArr[ele].status == 1){
                        this.checknumSarr.push(this.digitArr[index].numTextArr[ele].num) 
                    } else {
                       this.checknumSarr.splice(this.checknumSarr.indexOf(ele),1)    
                    } 
                }

                if(index == 4){  //个位选码、第五位选码
                    if(this.digitArr[index].numTextArr[ele].status == 1){
                        this.checknumGarr.push(this.digitArr[index].numTextArr[ele].num) 
                    } else {
                       this.checknumGarr.splice(this.checknumGarr.indexOf(ele),1)    
                    } 
                }

                if(index == 5){  //第六位选码
                    if(this.digitArr[index].numTextArr[ele].status == 1){
                        this.checknumSixarr.push(this.digitArr[index].numTextArr[ele].num) 
                    } else {
                       this.checknumSixarr.splice(this.checknumSixarr.indexOf(ele),1)    
                    } 
                }    

                if(index == 6){  //第七位选码
                    if(this.digitArr[index].numTextArr[ele].status == 1){
                        this.checknumSevenarr.push(this.digitArr[index].numTextArr[ele].num) 
                    } else {
                       this.checknumSevenarr.splice(this.checknumSevenarr.indexOf(ele),1)    
                    } 
                }   
                  
                if(index == 7){  //第八位选码
                    if(this.digitArr[index].numTextArr[ele].status == 1){
                        this.checknumEightarr.push(this.digitArr[index].numTextArr[ele].num) 
                    } else {
                       this.checknumEightarr.splice(this.checknumEightarr.indexOf(ele),1)    
                    } 
                }  

                if(index == 8){  //第九位选码
                    if(this.digitArr[index].numTextArr[ele].status == 1){
                        this.checknumNinearr.push(this.digitArr[index].numTextArr[ele].num) 
                    } else {
                       this.checknumNinearr.splice(this.checknumNinearr.indexOf(ele),1)    
                    } 
                }   

                if(index == 9){  //第十位选码
                    if(this.digitArr[index].numTextArr[ele].status == 1){
                        this.checknumTenarr.push(this.digitArr[index].numTextArr[ele].num) 
                    } else {
                       this.checknumTenarr.splice(this.checknumTenarr.indexOf(ele),1)    
                    } 
                }   

                if(index == 10){  //第十一位选码
                    if(this.digitArr[index].numTextArr[ele].status == 1){
                        this.checknumElevenarr.push(this.digitArr[index].numTextArr[ele].num) 
                    } else {
                       this.checknumElevenarr.splice(this.checknumElevenarr.indexOf(ele),1)    
                    } 
                }   

                if(index == 11){  //第十二位选码
                    if(this.digitArr[index].numTextArr[ele].status == 1){
                        this.checknumTwelvearr.push(this.digitArr[index].numTextArr[ele].num) 
                    } else {
                       this.checknumTwelvearr.splice(this.checknumTwelvearr.indexOf(ele),1)    
                    } 
                }        
                //注数判断
                this.commitinfo.betting_num = this.checknumGarr.length+this.checknumSarr.length+this.checknumBarr.length+this.checknumQarr.length+this.checknumWarr.length +
                                                this.checknumSevenarr.length + this.checknumSixarr.length + this.checknumEightarr.length + this.checknumNinearr.length +
                                                this.checknumTenarr.length + this.checknumElevenarr.length + this.checknumTwelvearr.length
            },

            bettingnumFn(ele){  //几星直选对注数的监听  
                var brnum_arr = []
                if(this.leftinfoid == 47){
                   brnum_arr = this.numberitem.split(' ')
                }
            },

            changenumFn(){    //注数输入验证       
                if(this.$store.state.leftMenu.name == '龙虎' || this.$store.state.leftMenu.name == '大小' || this.$store.state.leftMenu.name == '单双'){
                    
                } else {
                    this.numberitem=this.numberitem.replace(/[^0-9\u0020]/g,'')
                }  
                
            },

            doubleFn(){  //倍投提交
                 //倍投验证
                 if(!this.commitinfo.betting_num){
                    this.$toast({
                        message: '请输入注数'
                    })
                    return
                }
                if(!this.commitinfo.cycle){
                    this.$toast({
                        message: '请输入计划周期'
                    })
                    return
                }
                if(!this.commitinfo.multiply){
                    this.$toast({
                        message: '请输入倍数'
                    })
                    return
                }
                if(this.commitinfo.multiply>10000 || this.commitinfo.multiply<1){
                    this.$toast({
                        message: '倍数请输入大于等于1，小于等于10000的自然数'
                    })
                    return
                }
                if(!this.commitinfo.bonus){
                    this.$toast({
                        message: '请输入奖金模式'
                    })
                    return
                }
                if(this.commitinfo.bonus>2000 || this.commitinfo.bonus<1800){
                    this.$toast({
                        message: '奖金模式请输入大于等于1800，小于等于2000的自然数'
                    })
                    return
                }
                if(this.commitinfo.multiply>10000 || this.commitinfo.multiply<1){
                    this.$toast({
                        message: '倍数请输入大于等于1，小于等于10000的自然数'
                    })
                    return
                } 
                if(this.retecheck){
                    this.rate = 10
                    if(!this.rate){
                        this.$toast({
                            message: '请输入累计收益率'
                        })
                    }             
                } else{
                    this.rate = ''
                }
               
                var params = {
                    lottery_id: this.commitinfo.lottery_id,
                    play_id: this.leftinfoid,
                    bet: this.commitinfo.betting_num,
                    multiply: this.commitinfo.multiply,
                    periods: this.commitinfo.cycle,
                    bonus: this.commitinfo.bonus,
                    rate: this.rate
                }
                this.https('index/postObtainMultiplyData.html', params, 'post').then(data => {
                    this.tableData1 = data
                })            
            },

            commitPlan(){  //提交计划   
                if(!this.commitinfo.position || !this.commitinfo.position_identification){
                     this.$toast({
                            message: '请选择当前位置'
                        })
                        return
                }

                if(this.share_checked){
                    this.commitinfo.is_share = 1
                } else{
                     this.commitinfo.is_share = 0
                }

                if(this.leftinfoid == 46 || this.leftinfoid == 98 || this.leftinfoid == 102 || this.leftinfoid == 108 || this.leftinfoid == 112){  //定位胆注数验证
                    if(this.leftinfoid == 46 || this.leftinfoid == 98){
                        this.commitinfo.number_content = this.checknumWarr.join(',') +'|'+ this.checknumQarr.join(',') +'|'+ this.checknumBarr.join(',') +'|'+ this.checknumSarr.join(',') +'|'+ this.checknumGarr.join(',')                                                         
                    }
                    if(this.leftinfoid == 108 || this.leftinfoid == 112){
                        this.commitinfo.number_content = this.checknumWarr.join(',') +'|'+ this.checknumQarr.join(',') +'|'+ this.checknumBarr.join(',')                                                        
                    }
                    if(this.leftinfoid == 102){                   
                        this.commitinfo.number_content = this.checknumWarr.join(',') +'|'+ this.checknumQarr.join(',') +'|'+ this.checknumBarr.join(',') +'|'+ this.checknumSarr.join(',') +'|'+ this.checknumGarr.join(',') +'|'+ this.checknumSixarr.join(',')
                                                     '|'+ this.checknumSevenarr.join(',') +'|'+ this.checknumEightarr.join(',') +'|'+ this.checknumNinearr.join(',') +'|'+ this.checknumTenarr.join(',') +'|'+  this.checknumElevenarr.join(',') +'|'+  +
                                                        this.checknumTwelvearr.join(',')   
                    }   
                    if((this.digitArr.length == 3 && this.commitinfo.number_content.length<3) || (this.digitArr.length  == 5 && this.commitinfo.number_content.length<5) || (this.digitArr.length > 5 && this.commitinfo.number_content.length<=6)){
                        this.$toast({
                            message: '请选择注数！'
                        })
                        return
                    }                     
                } else {  //几星直选注数验证
                    if(!this.numberitem){  
                        this.$toast({
                            message: '请输入数字号码！'
                        })
                        return
                    }

                    this.commitinfo.number_content = this.numberitem.split(' ')

                    var arrData = this.commitinfo.number_content

                    for(var i=0; i<arrData.length; i++){

                        var co1 = this.$store.state.leftMenu.name == '二星直选' && arrData[i].length !=2
                        var co2 = this.$store.state.leftMenu.name == '三星直选' && arrData[i].length !=3
                        var co3 = this.$store.state.leftMenu.name == '四星直选' && arrData[i].length !=4
                        var co4 = this.$store.state.leftMenu.name == '五星直选' && arrData[i].length !=5
                        //广东11选5
                        var co5 = this.$store.state.leftMenu.name == '二位直选' && arrData[i].length !=4
                        var co6 = this.$store.state.leftMenu.name == '三位直选' && this.commitinfo.number_content[i].length !=6

                        //北京pk10
                        var co7 = this.$store.state.leftMenu.name == '二星直选' && arrData[i].length !=4
                        var co8 = this.$store.state.leftMenu.name == '三星直选' && arrData[i].length !=6
                        var co9 = this.$store.state.leftMenu.name == '四星直选' && arrData[i].length !=8
                        var co10 = this.$store.state.leftMenu.name == '五星直选' && arrData[i].length !=10

                        var indexone, indextwo, indexthree, indexfore, indexfive
                    
                           
                        if(this.$store.state.CaiPiaoType == 'pk10' || this.$store.state.CaiPiaoType == 'l11x5'){
                            if(co5 || co6 || co7 || co8 || co9 || co10 ){
                               this.$toast({ message: '计划内容中存在不符合位数的号码，请重新输入'})
                                return
                            } 

                            if(arrData[i].length==2 && ((this.$store.state.CaiPiaoType == 'pk10' && arrData[i]>10) || (this.$store.state.CaiPiaoType == 'l11x5' && arrData[i]>11))){
                                this.$toast({ message: '计划内容中存在不符合位数的号码，请重新输入'})
                                return
                                
                            }

                            if(arrData[i].length==4){
                                indexone = arrData[i].substring(0,2)
                                indextwo = arrData[i].substr(2,2)
                                
                                if(this.$store.state.CaiPiaoType == 'l11x5' && (indexone > 11 || indextwo > 11) ){
                                    this.$toast({ message: '计划内容中存在不符合位数的号码，请重新输入'})
                                    return
                                    
                                }

                                if(this.$store.state.CaiPiaoType == 'pk10' && (indexone > 10 || indextwo > 10) ){
                                    this.$toast({ message: '计划内容中存在不符合位数的号码，请重新输入'})
                                    return
                                }
                                
                                
                            }

                            if(arrData[i].length==6){
                                indexone = arrData[i].substring(0,2)
                                indextwo = arrData[i].substr(2,2)
                                indexthree = arrData[i].substr(4,2)

                                if(this.$store.state.CaiPiaoType == 'l11x5' && (indexone > 11 || indextwo > 11 || indexthree > 11) ){
                                    this.$toast({ message: '计划内容中存在不符合位数的号码，请重新输入'})
                                    return false
                                }

                                if(this.$store.state.CaiPiaoType == 'pk10' && (indexone > 10 || indextwo > 10  || indexthree > 10) ){
                                   this.$toast({ message: '计划内容中存在不符合位数的号码，请重新输入'})
                                    return false
                                }
                                
                            }

                            if(arrData[i].length==8){
                                indexone = arrData[i].substring(0,2)
                                indextwo = arrData[i].substr(2,2)
                                indexthree = arrData[i].substr(4,2)
                                indexfore = arrData[i].substr(6,2)
                                
                                if(this.$store.state.CaiPiaoType == 'l11x5' && (indexone > 11 || indextwo > 11 || indexthree > 11 || indexfore > 11) ){
                                    this.$toast({ message: '计划内容中存在不符合位数的号码，请重新输入'})
                                    return false
                                }

                                if(this.$store.state.CaiPiaoType == 'pk10' && (indexone > 10 || indextwo > 10  || indexthree > 10  || indexfore > 10) ){
                                    this.$toast({ message: '计划内容中存在不符合位数的号码，请重新输入'})
                                    return false
                                }
                            }

                            if(arrData[i].length==10){
                                indexone = arrData[i].substring(0,2)
                                indextwo = arrData[i].substr(2,2)
                                indexthree = arrData[i].substr(4,2)
                                indexfore = arrData[i].substr(6,2)
                                indexfive = arrData[i].substr(8,2)
                                if(this.$store.state.CaiPiaoType == 'l11x5' && (indexone > 11 || indextwo > 11 || indexthree > 11 || indexfore > 11 || indexfive > 11) ){
                                    this.$toast({ message: '计划内容中存在不符合位数的号码，请重新输入'})
                                    return
                                }

                                if(this.$store.state.CaiPiaoType == 'pk10' && (indexone > 10 || indextwo > 10  || indexthree > 10  || indexfore > 10 || indexfive > 10) ){
                                    this.$toast({ message: '计划内容中存在不符合位数的号码，请重新输入'})
                                    return
                                }
                            }

                        } else {
                            if(co1 || co2 || co3 || co4 || co5 || co6){
                            this.$toast({ message: '计划内容中存在不符合位数的号码，请重新输入'})
                            return
                        }

                        }
                        
                        if(this.$store.state.leftMenu.name == '龙虎' && (arrData[i] != "龙" && arrData[i] != "虎")){
                            this.$toast({ message: '龙虎号码验证只能输入龙虎，请重新输入'})
                            return
                        } 
                        if(this.$store.state.leftMenu.name == '大小' && (arrData[i] != "大" && arrData[i] != "小")){
                            this.$toast({ message: '大小号码验证只能输入大小，请重新输入'})
                            return
                        } 
                        if(this.$store.state.leftMenu.name == '单双' && (arrData[i] != "单" && arrData[i] != "双")){
                            this.$toast({
                                message: '单双号码验证只能输入单双，请重新输入'
                            })
                            return
                        } 
                    }
                    this.commitinfo.number_content = this.numberitem

                }
                //倍投验证
                if(!this.commitinfo.cycle){
                    this.$toast({
                        message: '请输入计划周期'
                    })
                    return
                }

                if(this.commitinfo.cycle<1 || this.commitinfo.cycle>50){
                    this.$toast({
                        message: '计划周期是大于1小于50的自然数'
                    })
                    return
                }
                
                if(!this.commitinfo.multiply){
                    this.$toast({
                        message: '请输入倍数'
                    })
                    return
                }

                if(this.commitinfo.multiply>10000 || this.commitinfo.multiply<1){
                    this.$toast({
                        message: '倍数请输入大于等于1，小于等于10000的自然数'
                    })
                    return
                }
                if(!this.commitinfo.bonus){
                    this.$toast({
                        message: '请输入奖金模式'
                    })
                    return
                }


                if(this.commitinfo.bonus>2000 || this.commitinfo.bonus<1800){
                    this.$toast({
                        message: '奖金模式请输入大于等于1800，小于等于2000的自然数'
                    })
                    return
                }

                if(this.commitinfo.multiply>10000 || this.commitinfo.multiply<1){
                    this.$toast({
                        message: '倍数请输入大于等于1，小于等于10000的自然数'
                    })
                    return
                } 
                

                this.https('Manual/postPlanSubmit',this.commitinfo, 'post').then(data => {
                    this.$toast({
                        message: '提交成功！'
                    })

                    this.getplanText(this.leftinfoid)
                    this.getTextinfo(this.leftinfoid)
                })
            },

            getplanText(id){  //获取文本计划
                this.https('Manual/getObtainPlanText', {lottery_id: this.$store.state.lottery_id, label_pc_id: id}).then(data => {
                    this.planText = data 
                    if(data!=null){
                        this.refreshtime = data.time
                    }                  
                })
            },

            getTextinfo(id){  //获取文本计划详情
                this.https('Manual/getObtainPlanList', {lottery_id: this.$store.state.lottery_id, label_pc_id: id}).then(data => {
                    this.planTextinfo = data 
                })
            },

            deletedata:function(id, index){  //删除单条文本计划详情
                this.planTextinfo.list.splice(index,1)
            },

            textFn(type){  //右侧文本模块tab选择
                if(type == 1){  //文本计划
                    this.textplanshow = true
                    this.planinfoshow = false
                } else if(type == 2){
                    this.textplanshow = false
                    this.planinfoshow = true
                }
            },

            getTemplatelist(){  //获取模板列表
                this.https('Manual/getObtainTemplateList',{uid: this.commitinfo.uid,is_use:0}).then(data => {
                    this.teplatelist = data
                })
            },
 
            resetplan:function(){  // 重置计划                
                this.isdel = true
            },
            delresetFn(){
                this.https('Manual/RechargePlanList',{uid: this.commitinfo.uid,lottery_id: this.lotteryid,plan_id:this.leftinfoid}).then(data => {
                    this.$toast({
                        message: '重置成功'
                    })
                })
                if(this.planText != null){
                    this.planText = ''
                }
                if(this.planTextinfo != null){
                    this.planTextinfo = ''
                }
                this.isdel = false
            },
            colseFn(){
                this.isdel = false
            },

            copytext:function (type) {  // 点击复制
                var Url2
                if(type == 1){  //文本计划复制
                    Url2=document.getElementById("text").innerText
                } else if(type == 2){  //注数输入复制
                    if(this.leftinfoid == 46){
                        return
                    }
                    Url2=this.numberitem
                }
                var oInput = document.createElement('input');
                oInput.value = Url2;
                document.body.appendChild(oInput);
                oInput.select(); // 选择对象
                document.execCommand("Copy"); // 执行浏览器复制命令
                oInput.className = 'oInput';
                oInput.style.display='none';
            },

            pastrFn(){  //粘贴功能
               if (window.require) {
                this.numberitem = clipboard.readText();
               }
            },

            clearFn(){  //清空功能
                if(this.leftinfoid == 46 || this.leftinfoid==98 || this.leftinfoid==108  || this.leftinfoid==102  || this.leftinfoid==112){
                    this.digitArr.forEach(arr => {
                        arr.numTextArr.forEach(arritem => {
                            arritem.status = 0
                        })
                    })
                    this.checknumWarr = []
                    this.checknumQarr = [] 
                    this.checknumBarr = [] 
                    this.checknumSarr = [] 
                    this.checknumGarr = [] 
                    this.commitinfo.betting_num = 0   //注数判断
                } else {
                    this.numberitem = ''
                }
            },
            
            //qq/微信群发
            sendmsgFn(){
                if (window.require) { 
                    ipc.send('sendMsg','plancommit');
                }
            },

            // 群发消息,接收主线程传递参数
            BulkHair(){
                if(!sessionStorage.plancommit){
                    sessionStorage.plancommit = 1;
                    if (window.require) { 
                        ipc.on('plancommit-msg', (event, arg) => {
                        if(!arg){
                            window.location.href = `startQQManualSend:${this.$store.state.userInfo.id},${this.$store.state.lottery_id},${this.leftinfoid},${sessionStorage.token}`; 
                        }
                        this.https('manual/BulkHair',{plan_id: this.leftinfoid, lottery_id: this.$store.state.lottery_id}).then(data =>{
                            if(!data){
                                   this.$toast({
                                    message: '请先提交您的计划'
                                })
                            }
                        })
                        });
                    } 
                }
            },

            fresh:function () {  // 点击刷新
                this.getplanText(this.leftinfoid)
                this.getTextinfo(this.leftinfoid)
                this.getTemplatelist()
                this.$toast({
                    message: '刷新成功'
                })
            },
            
            checktemplate(){  //选着当前模板
                this.activered=false;
                this.showred=false;
                this.opaactive=true;
                this.opalineactive=true;
                this.opaplanxq=true;
                this.disactive=true;
            }
        }
    }
</script>

<style scoped>
@import url(../../assets/css/plan/planpublic.less);
@import url(../../assets/css/plan/twostar.less);

</style>
<style>
.plancommit .el-checkbox+.el-checkbox{
    margin-left: 0.1rem;
}
.plancommit .el-checkbox__label{
    padding-left: 0.05rem;
    
}
.plancommit .el-textarea__inner{
    border: none;
    outline: none;
}
.el-checkbox__input,.el-checkbox__inner{
    width: 0.13rem;
    height: 0.13rem;
}
.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner{
    background-color: #E52A20 !important;
    border-color: #E52A20 !important;
}
.el-checkbox__input.is-disabled+span.el-checkbox__label{
    color: #333333 !important ;
}
.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner::after{
    border-color: #ffffff !important; 
}
.el-checkbox__input.is-checked .el-checkbox__inner, .el-checkbox__input.is-indeterminate .el-checkbox__inner{
    background-color: #E52A20;
    border-color: #E52A20;
}
.el-checkbox__inner:hover{
    border-color: #E52A20;
}
.el-checkbox__input.is-focus .el-checkbox__inner{
    border-color: #E52A20 !important;
}
.el-checkbox__input.is-checked+.el-checkbox__label{
    color:#333333;
}
span.el-checkbox__label{
    font-size:0.12rem;
    color:#333333;
    font-weight: normal !important;
}   
.el-table td,.el-table th{
    padding:0;
    font-size:0.12rem;
    color:#333333;
    text-align:center;
}
.el-table .cell, .el-table th div, .el-table--border td:first-child .cell, .el-table--border th:first-child .cell{
    padding-left:0;
    text-align:center;
}
.el-table .cell, .el-table th div{
    padding-right:0;
}

.el-table th:only-of-type(1) .cell{
    width:0.3rem;
}
.plancommit .el-table__header{
    color: #909399;
    width: none !important;
    background-color: red;
}
.plancommit .el-checkbox-group{
    height: 0.25rem;
    line-height: 0.25rem;
}
.textnum{
    width: 100%;
    height: 1.5rem;
    border: none
}
</style>
